//
//  QDMineTableViewCell.m
//  qidianchelian
//
//  Created by 冯贺 on 2018/4/20.
//  Copyright © 2018年 冯贺. All rights reserved.
//

#import "QDMineTableViewCell.h"

@implementation QDMineTableViewCell

- (void)setFrame:(CGRect)frame{
        frame.origin.x += 15*bili;
    frame.origin.y += 15*bili;
    frame.size.height -= 15*bili;
        frame.size.width -= 30*bili;
    [super setFrame:frame];
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setUI];
    }
    return self;
}
-(void)setUI{
    UIView * backView = [[UIView alloc]init];
    backView.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:backView];
    
    _iconImg = [[UIImageView alloc]init];
    [backView addSubview:_iconImg];
    
    _titleL = [[UILabel alloc]initWithTitle:@"" font:16*bili color:kBlackColor];
    [backView addSubview:_titleL];
    
    backView.sd_layout
    .leftEqualToView(self.contentView)
    .topEqualToView(self.contentView)
    .widthRatioToView(self, 1)
    .heightRatioToView(self.contentView, 1);
    backView.clipsToBounds = YES;
    backView.layer.cornerRadius = 6*bili;
    
    _iconImg.sd_layout
    .leftSpaceToView(backView, 20*bili)
    .centerYEqualToView(backView)
    .widthIs(20*bili)
    .heightEqualToWidth();
    
    _titleL.sd_layout
    .leftSpaceToView(_iconImg, 10*bili)
    .centerYEqualToView(_iconImg)
    .widthIs(200*bili)
    .heightRatioToView(backView, 1);
}
@end
